home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CDsupport / IDer / Routines / ProcessName.s < prev    next >
Text File  |  1997-02-18  |  752b  |  30 lines

  1. ProcessName:    Move.L    _Name(PC),A0        ;was a NAME entry included
  2.     Cmp.L    #0,A0
  3.     Beq.S    .NoName
  4.  
  5.     Lea    WorkData,A1
  6.     Bsr    StripQuotes        ;copy the string into a working buffer
  7.  
  8.     Move.L    #WorkData,D1
  9.     Move.L    #ParseData,D2
  10.     Move.L    #255,D3
  11.     CALL    ParsePatternNoCase,DOS    ;tokinize any wildcards that may be present
  12.     Cmp.L    #-1,D0
  13.     Beq.S    .BadName
  14.  
  15.     Move.L    #ParseData,D1
  16.     Move.L    _FilePart(PC),D2
  17.     CALL    MatchPatternNoCase    ;try and match filename with NAME entry
  18.     Tst.L    D0
  19.     Beq.S    .BadName
  20.  
  21.     Addq.B    #1,_Successful        ;yeah.  the file passed the check
  22.  
  23.     Cmp.B    #MODE_ONE,_Mode        ;check what mode we are in
  24.     Beq    LaunchAction        ;run ACTION if in OR mode
  25.     Bra.S    .NoName
  26.  
  27. .BadName    Cmp.B    #MODE_ALL,_Mode        ;are we running in OR mode
  28.     Beq    CheckLoop        ;if not, then abort the search
  29. .NoName
  30.